﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using VK.Comm.Xml;
using System.Web;

namespace VK.Comm
{
    public static class SettingManage<T> where T : class
    {
        public static T GetEntity(string path)
        {
            T entity = XmlFileOperate<T>.XmlFileDecode(HttpContext.Current.Server.MapPath("~") + path);
            return entity;
        }

        public static bool SetEntity(T entity, string path)
        {
            return XmlFileOperate<T>.XmlFileEncode(entity, HttpContext.Current.Server.MapPath("~") + path);
        }
    }
}
